package com.sanploy.common.domain;

/**
 * Created by zhu yingzhi on 2017/10/16.
 * @author yingzhi zhu
 * 管理员数据库实体类
 */
public class Admin {
    /**
     * id
     */
    private Long id;
    /**
     * 用户名
     */
    private String username; 
    /**
     * 密码
     */
    private String password; 
    /**
     * 用户权限 可多个权限 用，隔开。所有管理员SUPER,USER,ORDER,GOODS,FREIGHT,MESSAGE,CATEGORY
     */
    private String role;  
    /**
     * 添加时间
     */
    private String add_time; 
    /**
     * 是否可用
     */
    private boolean is_enable; 
    /**
     * 昵称
     */
    private String nick_name; 

    public boolean isIs_enable() {
        return is_enable;
    }

    public void setIs_enable(boolean is_enable) {
        this.is_enable = is_enable;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getAdd_time() {
        if (add_time!=null && add_time.contains(".0")){
            add_time = add_time.substring(0,add_time.length()-2);
        }
        return add_time;
    }

    public void setAdd_time(String add_time) {
        this.add_time = add_time;
    }

    public String getNick_name() {
        return nick_name;
    }

    public void setNick_name(String nick_name) {
        this.nick_name = nick_name;
    }
}
